-------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/Wei/Dropbox/Fertility/Results/child_results.log
  log type:  text
 opened on:  21 Jan 2020, 11:47:33

. 
. ************ Fertility **************
. set more off

. 
. use "$path2/marr_policy", clear

. gen mort_rate = 100 -sur_rate if women == 1 
(6,645,526 missing values generated)

. ren year yr_t

. gen year = year_birth +15

. merge m:1 prov year using "$path2/fines_economic", keepusing(lngdp_pc lngdp secondary primary)
(note: variable prov was byte, now float to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                           589
        from master                         0  (_merge==1)
        from using                        589  (_merge==2)

    matched                        11,547,566  (_merge==3)
    -----------------------------------------

. drop if _merge == 2
(589 observations deleted)

. drop _merge 

. drop year

. ren yr_t year

. 
. egen fine_7_15 = rowmean(fine_age7-fine_age15)

. egen fine_8_15 = rowmean(fine_age8-fine_age15)

. egen fine_6_20 = rowmean(fine_age6-fine_age20)

. egen fine_16_22 = rowmean(fine_age6-fine_age20)

. egen fine_8_22 = rowmean(fine_age8-fine_age22)

. egen fine_26_30 = rowmean(fine_age26-fine_age30)
(34348 missing values generated)

. egen fine_21_30 = rowmean(fine_age21-fine_age30)

. 
. egen fine_6_18 = rowmean(fine_age6-fine_age18)

. egen fine_6_22 = rowmean(fine_age6-fine_age22)

. egen fine_8_20 = rowmean(fine_age8-fine_age20)

. egen fine_4_20 = rowmean(fine_age4-fine_age20)

. egen fine_1_20 = rowmean(fine_age1-fine_age20)

. 
. egen fine_4_22 = rowmean(fine_age4-fine_age22)

. 
. gl FINE_ALL = "fine_6_15 fine_16_20 fine_21_25 fine_26_30"

. gl FINE_VAR_4 =  "fine_6_15 fine_16_20 fine_21_30"

. 
. gl FINE_VAR_3 =  "fine_6_15 fine_16_20 fine_21_25"

. gl FINE_VAR_1 = "fine_6_20"

. 
. replace nbroth = 99 if mi(nbroth)
(11,325,299 real changes made)

. replace nsister = 99 if mi(nsister)
(11,325,299 real changes made)

. 
. gen lnsec = ln(secondary)
(238,182 missing values generated)

. gen lnpri = ln(primary)
(352,981 missing values generated)

. gen lnsec_mi = mi(lnsec)

. gen lnpri_mi = mi(lnpri)

. egen mean_lnsec = mean(lnsec)

. egen mean_lnpri = mean(lnpri)

. replace lnsec = mean_lnsec if mi(lnsec)
(238,182 real changes made)

. replace lnpri = mean_lnpri if mi(lnpri)
(352,981 real changes made)

. la var fine_6_10 "Ages 6-10"

. la var fine_11_15 "Ages 11-15"

. la var fine_16_20 "Ages 16-20"

. la var fine_21_25 "Ages 21-25"

. la var fine_6_12 "Ages 6-12"

. la var fine_13_19 "Ages 13-19"

. la var fine_20_25 "Ages 20-25"

. 
. gen provid = prov 

. merge m:1 provid using "$path2/Comp_Law", keepusing(law_*) nogen 

    Result                           # of obs.
    -----------------------------------------
    not matched                             1
        from master                         0  
        from using                          1  

    matched                        11,547,566  
    -----------------------------------------

. 
. cap drop elig

. gen elig = 1 if year_birth >= law_year - 6 
(11,539,033 missing values generated)

. replace elig = 0 if year_birth <= law_year - 16
(10,501,045 real changes made)

. replace elig = (16-(law_year - year_birth ))/10 if law_year - 16<year_birth & year_birth<law_ye
> ar - 6 
(1,037,988 real changes made)

. drop provid

. 
. 
. gl CONTROL_1 = "women#prov##c.year_birth women#year#year_birth"

. gl CONTROL_2 = "women#prov##c.year_birth women#year#year_birth women#prov#year"

. 
. gen urban_hk = hktype == 2 

. gen urban_res = city_flag <= 2 if !mi(city_flag)
(4,140,909 missing values generated)

. replace urban_res = urban_hk if  mi(urban_res)
(4,140,909 real changes made)

. 
. 
. egen han_p = mean(han), by(year hhid prov region)
(1 missing value generated)

. 
. replace high_occ = 0 if high_occ == . & !mi(work)
(1,603,442 real changes made)

. 
. 
. drop if han_p >0 & han_p < 1 // drop mixed households
(325,664 observations deleted)

. drop if women == 0 
(5,705,234 observations deleted)

. set more off

. gen n_death = n_birth - n_survive
(567,308 missing values generated)

. replace n_death = . if n_death < 0
(1 real change made, 1 to missing)

. replace n_birth = 0 if married_ever == 0 
(70,329 real changes made)

. replace n_mbirth = 0 if married_ever == 0  
(70,244 real changes made)

. replace n_fbirth = 0 if married_ever == 0  
(70,225 real changes made)

. replace n_survive = 0 if married_ever == 0 
(70,299 real changes made)

. replace n_mchild = 0 if married_ever == 0 
(70,225 real changes made)

. replace n_fchild = 0 if married_ever == 0 
(70,204 real changes made)

. drop if mi(n_birth)
(494,418 observations deleted)

. drop if mi(n_death)
(72,891 observations deleted)

. 
. gen male_prop = n_mbirth/n_birth
(179,243 missing values generated)

. 
. * Table C1, Panel A 
. su n_birth [aw = wt]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
     n_birth | 4949360     7020026    2.036461   1.251328          0         18

. su n_birth if n_birth >= 1 [aw = wt]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
     n_birth | 4770117     6779982    2.108561   1.212119          1         18

. su n_mbirth if n_birth >= 1 [aw = wt]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    n_mbirth | 4770117     6779982    1.110526   .8600175          0          9

. 
. * Table C2, column 1 
. cap erase "$path3/tab_c2_part1.xls"

. cap erase "$path3/tab_c2_part1.txt"

. reghdfe n_birth women#c.(fine_6_20) if han [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       3.05
Statistics robust to heteroskedasticity           Prob > F        =     0.0911
                                                  R-squared       =     0.4181
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0005
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_6_20 |
               1  |  -.2021068   .1157752    -1.75   0.091    -.4385512    .0343376
                  |
            _cons |   2.074815   .0470732    44.08   0.000     1.978679    2.170951
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c2_part1.xls", dec(3) append 
/Users/Wei/Dropbox/Fertility/Results/tab_c2_part1.xls
dir : seeout

. 
. 
. * Table C3, Column 6
. cap erase "$path3/tab_c3_part2.xls"

. cap erase "$path3/tab_c3_part2.txt"

. set more off

. foreach y_var in  "n_birth" {
  2. reghdfe `y_var' women#c.(fine_6_18) if han [aw = wt], a($CONTROL_1) cluster(prov)
  3. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
  4. reghdfe `y_var' women#c.(fine_6_22) if han [aw = wt], a($CONTROL_1) cluster(prov)
  5. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
  6. reghdfe `y_var' women#c.(fine_8_20) if han [aw = wt], a($CONTROL_1) cluster(prov)
  7. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
  8. reghdfe `y_var' women#c.(fine_4_20) if han [aw = wt], a($CONTROL_1) cluster(prov)
  9. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
 10. reghdfe `y_var' women#c.(fine_1_20) if han [aw = wt], a($CONTROL_1) cluster(prov)
 11. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
 12. reghdfe `y_var' women#c.(fine_4_22) if han [aw = wt], a($CONTROL_1) cluster(prov)
 13. outreg2 using "$path3/tab_c3_part2.xls", dec(3) append 
 14. }
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       2.69
Statistics robust to heteroskedasticity           Prob > F        =     0.1117
                                                  R-squared       =     0.4180
                                                  Adj R-squared   =     0.4180
                                                  Within R-sq.    =     0.0004
Number of clusters (prov)    =         31         Root MSE        =     0.9171

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_6_18 |
               1  |  -.1859449   .1134532    -1.64   0.112    -.4176472    .0457574
                  |
            _cons |   2.058165   .0399798    51.48   0.000     1.976516    2.139815
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       2.61
Statistics robust to heteroskedasticity           Prob > F        =     0.1165
                                                  R-squared       =     0.4182
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0006
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_6_22 |
               1  |  -.1922456   .1189259    -1.62   0.116    -.4351247    .0506334
                  |
            _cons |   2.081825   .0551712    37.73   0.000     1.969151      2.1945
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       3.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0807
                                                  R-squared       =     0.4182
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0006
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_8_20 |
               1  |  -.1743324   .0964444    -1.81   0.081    -.3712982    .0226335
                  |
            _cons |   2.070831    .043257    47.87   0.000     1.982489    2.159174
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       2.91
Statistics robust to heteroskedasticity           Prob > F        =     0.0981
                                                  R-squared       =     0.4181
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0005
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_4_20 |
               1  |   -.227764   .1334187    -1.71   0.098    -.5002412    .0447133
                  |
            _cons |   2.076501   .0491235    42.27   0.000     1.976177    2.176824
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       2.85
Statistics robust to heteroskedasticity           Prob > F        =     0.1015
                                                  R-squared       =     0.4181
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0005
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_1_20 |
               1  |  -.2653855   .1570826    -1.69   0.101     -.586191    .0554199
                  |
            _cons |   2.077142   .0500167    41.53   0.000     1.974994    2.179289
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   1,     30) =       2.53
Statistics robust to heteroskedasticity           Prob > F        =     0.1223
                                                  R-squared       =     0.4182
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0006
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                       (Std. Err. adjusted for 31 clusters in prov)
-----------------------------------------------------------------------------------
                  |               Robust
          n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
women#c.fine_4_22 |
               1  |  -.2135976   .1343324    -1.59   0.122     -.487941    .0607459
                  |
            _cons |   2.083103   .0568925    36.61   0.000     1.966913    2.199293
-----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part2.xls
dir : seeout

. 
. * Table C6, Column 1 
. reghdfe n_birth  fine_6_15 fine_16_20 fine_21_25  if han [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  4,621,938
Absorbing 2 HDFE groups                           F(   3,     30) =       4.03
Statistics robust to heteroskedasticity           Prob > F        =     0.0161
                                                  R-squared       =     0.4182
                                                  Adj R-squared   =     0.4181
                                                  Within R-sq.    =     0.0006
Number of clusters (prov)    =         31         Root MSE        =     0.9170

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
     n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_15 |  -.1039765   .1253292    -0.83   0.413     -.359933      .15198
  fine_16_20 |  -.0717971   .0292862    -2.45   0.020    -.1316075   -.0119868
  fine_21_25 |  -.0080349   .0299593    -0.27   0.790    -.0692201    .0531502
       _cons |   2.077563   .0733686    28.32   0.000     1.927725    2.227402
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c6_part1.xls", dec(3) replace 
/Users/Wei/Dropbox/Fertility/Results/tab_c6_part1.xls
dir : seeout

. 
. 
. * Table C8, Column 1
. reghdfe n_birth  fine_6_20  if han_p == 0  [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =    327,422
Absorbing 2 HDFE groups                           F(   1,     30) =       0.01
Statistics robust to heteroskedasticity           Prob > F        =     0.9227
                                                  R-squared       =     0.4012
                                                  Adj R-squared   =     0.4009
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =     1.2899

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
     n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.0107668   .1100338    -0.10   0.923    -.2354857    .2139522
       _cons |   2.605947   .0542298    48.05   0.000     2.495195    2.716699
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c8_part1.xls", dec(3) replace 
/Users/Wei/Dropbox/Fertility/Results/tab_c8_part1.xls
dir : seeout

. 
. 
. * Table C9, Row G
. cap erase "$path3/tab_c9_g.xls"

. cap erase "$path3/tab_c9_g.txt"

. reghdfe n_birth fine_6_20  if han & urban_hk == 1 [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =  1,190,132
Absorbing 2 HDFE groups                           F(   1,     30) =       5.55
Statistics robust to heteroskedasticity           Prob > F        =     0.0253
                                                  R-squared       =     0.4446
                                                  Adj R-squared   =     0.4445
                                                  Within R-sq.    =     0.0008
Number of clusters (prov)    =         31         Root MSE        =     0.6496

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
     n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.1590387   .0675337    -2.35   0.025     -.296961   -.0211164
       _cons |   1.432266   .0284231    50.39   0.000     1.374219    1.490314
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c9_g.xls", dec(3) append 
/Users/Wei/Dropbox/Fertility/Results/tab_c9_g.xls
dir : seeout

. reghdfe n_birth fine_6_20  if han & urban_hk != 1 [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  3,431,806
Absorbing 2 HDFE groups                           F(   1,     30) =       1.94
Statistics robust to heteroskedasticity           Prob > F        =     0.1735
                                                  R-squared       =     0.4602
                                                  Adj R-squared   =     0.4601
                                                  Within R-sq.    =     0.0005
Number of clusters (prov)    =         31         Root MSE        =     0.8997

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
     n_birth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.2049518   .1469946    -1.39   0.173    -.5051549    .0952513
       _cons |   2.309668    .058981    39.16   0.000     2.189213    2.430124
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        31          31           0    *|
   women#prov#c.year_birth |        31           0          31     |
     women#year#year_birth |       103           0         103    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c9_g.xls", dec(3) append 
/Users/Wei/Dropbox/Fertility/Results/tab_c9_g.xls
dir : seeout

. 
. 
. 
. ************ Child Mortality *********
. use "$path2/child_gender_mort", clear 

. gl CONTROL_1 = "prov##c.year_birth year#year_birth"

. gl CONTROL_2 = "prov##c.year_birth year#year_birth prov#year"

. gen wt = 1 

. replace wt = 4 if year == 2005
(1,373,603 real changes made)

. egen n = sum(1), by(hhid)

. 
. replace die = die*100
(342,953 real changes made)

. 
. * Table C1 Panel B Row 1 
. su die [aw = wt]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die |10175200    14296009    2.985721   17.01933          0        100

. 
. * Table C2, Column (2)
. reghdfe die  fine_6_20  if han_p == 1 [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       6.24
Statistics robust to heteroskedasticity           Prob > F        =     0.0182
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.6503059   .2603856    -2.50   0.018    -1.182084   -.1185276
       _cons |   2.782128   .0734866    37.86   0.000     2.632049    2.932208
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. 
. * Table C3, Column (7)
. cap erase "$path3/tab_c3_part3.xls"

. cap erase "$path3/tab_c3_part3.txt"

. 
. foreach sample in "han_p == 1"{
  2. reghdfe die  fine_6_18  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
  3. su die if `sample' [aw = wt] 
  4. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
  5. reghdfe die  fine_6_22  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
  6. su die if `sample' [aw = wt] 
  7. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
  8. reghdfe die  fine_8_20  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
  9. su die if `sample' [aw = wt] 
 10. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
 11. reghdfe die  fine_4_20  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
 12. su die if `sample' [aw = wt] 
 13. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
 14. reghdfe die  fine_1_20  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
 15. su die if `sample' [aw = wt] 
 16. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
 17. reghdfe die  fine_4_22  if `sample' [aw = wt], a($CONTROL_1) cluster(prov)
 18. su die if `sample' [aw = wt] 
 19. outreg2 using "$path3/tab_c3_part3.xls",append adds(Mean, `r(mean)') dec(3)
 20. }
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       9.20
Statistics robust to heteroskedasticity           Prob > F        =     0.0050
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_18 |  -.7752053   .2556465    -3.03   0.005    -1.297305   -.2531056
       _cons |   2.784862    .061426    45.34   0.000     2.659413     2.91031
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       3.88
Statistics robust to heteroskedasticity           Prob > F        =     0.0580
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_22 |  -.5157689   .2617009    -1.97   0.058    -1.050233    .0186957
       _cons |   2.767789   .0858478    32.24   0.000     2.592465    2.943114
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       5.47
Statistics robust to heteroskedasticity           Prob > F        =     0.0262
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_8_20 |  -.5328014   .2277929    -2.34   0.026    -.9980165   -.0675863
       _cons |   2.765766   .0714711    38.70   0.000     2.619803     2.91173
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       6.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0151
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_20 |  -.7516714   .2916822    -2.58   0.015    -1.347366    -.155977
       _cons |   2.789616   .0741239    37.63   0.000     2.638235    2.940997
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       6.97
Statistics robust to heteroskedasticity           Prob > F        =     0.0130
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_1_20 |  -.8929612   .3382427    -2.64   0.013    -1.583745   -.2021774
       _cons |   2.793934   .0739909    37.76   0.000     2.642824    2.945043
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   1,     30) =       4.10
Statistics robust to heteroskedasticity           Prob > F        =     0.0520
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_22 |  -.5869918   .2900345    -2.02   0.052    -1.179321    .0053378
       _cons |   2.773566   .0864523    32.08   0.000     2.597006    2.950125
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
         die | 9309439    12980194    2.598598   15.90934          0        100
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part3.xls
dir : seeout

. 
. * Table C6 Column 2 
. reghdfe die c.(fine_6_15 fine_16_20 fine_21_25) if  han_p == 1 [aw = wt], a($CONTROL_1) cluster
> (prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  9,309,439
Absorbing 2 HDFE groups                           F(   3,     30) =       7.58
Statistics robust to heteroskedasticity           Prob > F        =     0.0006
                                                  R-squared       =     0.0225
                                                  Adj R-squared   =     0.0225
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    15.7297

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_15 |  -.7022978   .2441919    -2.88   0.007    -1.201004   -.2035914
  fine_16_20 |  -.1673524   .0768779    -2.18   0.037    -.3243581   -.0103468
  fine_21_25 |   .0117979   .0580526     0.20   0.840    -.1067614    .1303573
       _cons |   2.796978   .1048624    26.67   0.000      2.58282    3.011135
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c6_part2.xls", dec(3) replace 
/Users/Wei/Dropbox/Fertility/Results/tab_c6_part2.xls
dir : seeout

. 
. * Table C8, Column 2
. reghdfe die  fine_6_20  if han_p == 0 [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =    865,761
Absorbing 2 HDFE groups                           F(   1,     30) =       0.83
Statistics robust to heteroskedasticity           Prob > F        =     0.3703
                                                  R-squared       =     0.0374
                                                  Adj R-squared   =     0.0372
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    24.7098

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .7129029   .7838407     0.91   0.370    -.8879135    2.313719
       _cons |   6.565233   .2631902    24.94   0.000     6.027726    7.102739
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c8_part2.xls", dec(3) replace 
/Users/Wei/Dropbox/Fertility/Results/tab_c8_part2.xls
dir : seeout

. 
. 
. * Table C9, Row H
. cap erase "$path3/tab_c9_h.xls"

. cap erase "$path3/tab_c9_h.txt"

. gen rural = 1 - urban_hk

. reghdfe die  fine_6_20  if han_p == 1 & urban_hk [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  1,612,389
Absorbing 2 HDFE groups                           F(   1,     30) =       0.97
Statistics robust to heteroskedasticity           Prob > F        =     0.3335
                                                  R-squared       =     0.0058
                                                  Adj R-squared   =     0.0057
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    10.5581

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.1523957   .1550405    -0.98   0.333    -.4690306    .1642392
       _cons |   1.180217   .0470647    25.08   0.000     1.084098    1.276336
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c9_h.xls", dec(3) append 
/Users/Wei/Dropbox/Fertility/Results/tab_c9_h.xls
dir : seeout

. reghdfe die  fine_6_20  if han_p == 1 & rural [aw = wt], a($CONTROL_1) cluster(prov)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  7,697,050
Absorbing 2 HDFE groups                           F(   1,     30) =       7.71
Statistics robust to heteroskedasticity           Prob > F        =     0.0094
                                                  R-squared       =     0.0251
                                                  Adj R-squared   =     0.0251
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         31         Root MSE        =    16.6647

                                  (Std. Err. adjusted for 31 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
         die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |  -.7918461   .2851027    -2.78   0.009    -1.374103   -.2095888
       _cons |   3.154218   .0790663    39.89   0.000     2.992743    3.315693
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              prov |        31          31           0    *|
 prov#c.year_birth |        31           0          31     |
   year#year_birth |        94           0          94    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. outreg2 using "$path3/tab_c9_h.xls", dec(3) append 
/Users/Wei/Dropbox/Fertility/Results/tab_c9_h.xls
dir : seeout

. 
. replace die = die/100
(342,953 real changes made)

. 
. 
. ***** Child Education ****
. 
. use "$path2/child_edu", clear 

. gl CONTROL_MOTHER = "girl#prov##c.(m_birth_year) girl#m_birth_year#year girl#age#year"

. gl CONTROL_GIRL = "girl#prov##c.(birth_year) girl#birth_year#year"

. 
. gl CONTROL_BOTH = "girl#prov##c.(m_birth_year birth_year) girl#m_birth_year#year girl#birth_yea
> r#year"

. 
. gl CONTROL_SHORT = "girl#prov#m_birth_year#year girl#prov##c.(birth_year) girl#birth_year#year"

. gl CONTROL_LONG = "girl#prov#birth_year#year girl#prov##c.(m_birth_year) girl#m_birth_year#year
> "

. 
. * Table C1, Panel B, Rows 2 & 3 
. su elig_edu educ [aw = wt]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 3161650     3612562     .712346    .452669          0          1
        educ | 3161650     3612562    2.190959     .56082          1          4

. 
. * Table C2, Columns 3 - 4 
. reghdfe elig_edu  fine_6_20  if han_hh == 1 [aw = wt], a($CONTROL_MOTHER) cluster(prov)
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       4.10
Statistics robust to heteroskedasticity           Prob > F        =     0.0530
                                                  R-squared       =     0.5207
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0761687   .0376384     2.02   0.053    -.0010589    .1533964
       _cons |   .6922139    .011285    61.34   0.000     .6690591    .7153688
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. reghdfe educ  fine_6_20  if han_hh == 1 [aw = wt], a($CONTROL_MOTHER) cluster(prov)
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       3.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0671
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0993825   .0520875     1.91   0.067    -.0074923    .2062573
       _cons |   2.163799   .0156172   138.55   0.000     2.131755    2.195842
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. 
. 
. * Table C3, Columns 8-9
. cap erase "$path3/tab_c3_part4.xls"

. cap erase "$path3/tab_c3_part4.txt"

. foreach sample in "han_hh == 1" {
  2. foreach y_var in  "elig_edu""educ" {
  3. foreach x_var in "fine_1_20" "fine_6_18""fine_6_22" "fine_8_20" "fine_4_20" "fine_4_22"{
  4. reghdfe `y_var' c.(`x_var') if  `sample' [aw = wt], a($CONTROL_MOTHER) cluster(prov)
  5. su `y_var' if  `sample' [aw = wt]
  6. outreg2 using "$path3/tab_c3_part4.xls", dec(3) append adds(mean, `r(mean)')
  7. }
  8. }
  9. }
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       4.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0478
                                                  R-squared       =     0.5207
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_1_20 |   .1024968   .0494231     2.07   0.048     .0010889    .2039047
       _cons |   .6918156   .0112041    61.75   0.000     .6688268    .7148045
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       6.99
Statistics robust to heteroskedasticity           Prob > F        =     0.0135
                                                  R-squared       =     0.5207
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0003
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_18 |    .108598   .0410768     2.64   0.013     .0243154    .1928806
       _cons |   .6873073   .0104941    65.49   0.000     .6657753    .7088393
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       2.22
Statistics robust to heteroskedasticity           Prob > F        =     0.1482
                                                  R-squared       =     0.5206
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0001
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_22 |    .051699   .0347321     1.49   0.148    -.0195654    .1229634
       _cons |   .6969816   .0121395    57.41   0.000     .6720733    .7218898
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       3.69
Statistics robust to heteroskedasticity           Prob > F        =     0.0654
                                                  R-squared       =     0.5207
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_8_20 |   .0631678   .0328946     1.92   0.065    -.0043264     .130662
       _cons |   .6935827   .0111798    62.04   0.000     .6706437    .7165217
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       4.25
Statistics robust to heteroskedasticity           Prob > F        =     0.0489
                                                  R-squared       =     0.5207
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_20 |   .0871074   .0422338     2.06   0.049     .0004508    .1737641
       _cons |   .6918627   .0112429    61.54   0.000     .6687941    .7149313
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       2.28
Statistics robust to heteroskedasticity           Prob > F        =     0.1424
                                                  R-squared       =     0.5206
                                                  Adj R-squared   =     0.5206
                                                  Within R-sq.    =     0.0001
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_22 |   .0583335   .0386045     1.51   0.142    -.0208765    .1375434
       _cons |   .6967225   .0121298    57.44   0.000     .6718342    .7216109
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       3.81
Statistics robust to heteroskedasticity           Prob > F        =     0.0613
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_1_20 |   .1340972   .0686699     1.95   0.061    -.0068017    .2749962
       _cons |   2.163197   .0155672   138.96   0.000     2.131255    2.195138
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       5.71
Statistics robust to heteroskedasticity           Prob > F        =     0.0241
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5741
                                                  Within R-sq.    =     0.0003
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_18 |   .1345921   .0563229     2.39   0.024     .0190272    .2501571
       _cons |   2.159211    .014389   150.06   0.000     2.129687    2.188735
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       2.24
Statistics robust to heteroskedasticity           Prob > F        =     0.1457
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_22 |   .0724462   .0483594     1.50   0.146    -.0267792    .1716715
       _cons |   2.168275   .0169025   128.28   0.000     2.133594    2.202956
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       3.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0803
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_8_20 |   .0820449   .0451417     1.82   0.080    -.0105782    .1746681
       _cons |   2.165712   .0153422   141.16   0.000     2.134232    2.197191
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       3.77
Statistics robust to heteroskedasticity           Prob > F        =     0.0626
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_20 |   .1138639   .0586234     1.94   0.063    -.0064214    .2341493
       _cons |   2.163285    .015606   138.62   0.000     2.131264    2.195306
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   1,     27) =       2.30
Statistics robust to heteroskedasticity           Prob > F        =     0.1406
                                                  R-squared       =     0.5741
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_4_22 |   .0817848   .0538704     1.52   0.141    -.0287482    .1923178
       _cons |   2.167899   .0169265   128.08   0.000     2.133168    2.202629
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c3_part4.xls
dir : seeout

. 
. * Table C6, Columns 3-4
. cap erase "$path3/tab_c6_part3.xls"

. cap erase "$path3/tab_c6_part3.txt"

. foreach y_var in  "elig_edu""educ" {
  2. reghdfe `y_var' c.(fine_6_15 fine_16_20 fine_21_25) if  han_hh == 1 [aw = wt], a($CONTROL_MO
> THER) cluster(prov)
  3. su `y_var' if  han_hh == 1 [aw = wt]
  4. outreg2 using "$path3/tab_c6_part3.xls", dec(3) append adds(mean, `r(mean)')
  5. }
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   3,     27) =       3.67
Statistics robust to heteroskedasticity           Prob > F        =     0.0244
                                                  R-squared       =     0.5208
                                                  Adj R-squared   =     0.5207
                                                  Within R-sq.    =     0.0004
Number of clusters (prov)    =         28         Root MSE        =     0.3125

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_15 |   .1393395   .0448257     3.11   0.004     .0473647    .2313143
  fine_16_20 |   .0159127    .009976     1.60   0.122    -.0045563    .0363818
  fine_21_25 |   .0039712   .0061978     0.64   0.527    -.0087456    .0166879
       _cons |   .6773349   .0134597    50.32   0.000     .6497179    .7049519
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c6_part3.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,641,034
Absorbing 3 HDFE groups                           F(   3,     27) =       3.16
Statistics robust to heteroskedasticity           Prob > F        =     0.0409
                                                  R-squared       =     0.5742
                                                  Adj R-squared   =     0.5741
                                                  Within R-sq.    =     0.0005
Number of clusters (prov)    =         28         Root MSE        =     0.3647

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_15 |   .1783532   .0612224     2.91   0.007     .0527353    .3039711
  fine_16_20 |    .021045   .0132152     1.59   0.123    -.0060703    .0481603
  fine_21_25 |   .0073827   .0077429     0.95   0.349    -.0085044    .0232698
       _cons |   2.142994   .0191034   112.18   0.000     2.103797    2.182191
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       224           0         224    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c6_part3.xls
dir : seeout

. 
. * Table C8, Columns 3-4
. cap erase "$path3/tab_c8_part3.xls"

. cap erase "$path3/tab_c8_part3.txt"

. foreach sample in  " non_han_hh == 1 " {
  2. foreach y_var in  "elig_edu""educ" {
  3. reghdfe `y_var' c.(fine_6_20) if  `sample' [aw = wt], a($CONTROL_MOTHER) cluster(prov)
  4. su `y_var' if  `sample' [aw = wt]
  5. outreg2 using "$path3/tab_c8_part3.xls", dec(3) append adds(mean, `r(mean)')
  6. }
  7. }
(dropped 7 singleton observations)
(MWFE estimator converged in 9 iterations)

HDFE Linear regression                            Number of obs   =    168,374
Absorbing 3 HDFE groups                           F(   1,     27) =       1.98
Statistics robust to heteroskedasticity           Prob > F        =     0.1710
                                                  R-squared       =     0.5261
                                                  Adj R-squared   =     0.5250
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3328

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0739682   .0525922     1.41   0.171    -.0339421    .1818785
       _cons |   .5990815    .021778    27.51   0.000     .5543968    .6437662
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       209           0         209    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 168,381      195894    .6296824   .4828912          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c8_part3.xls
dir : seeout
(dropped 7 singleton observations)
(MWFE estimator converged in 9 iterations)

HDFE Linear regression                            Number of obs   =    168,374
Absorbing 3 HDFE groups                           F(   1,     27) =       1.61
Statistics robust to heteroskedasticity           Prob > F        =     0.2159
                                                  R-squared       =     0.4526
                                                  Adj R-squared   =     0.4513
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.4103

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0840129   .0662931     1.27   0.216    -.0520092     .220035
       _cons |   2.005101   .0274514    73.04   0.000     1.948775    2.061426
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       209           0         209    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 168,381      195894    2.039965   .5540067          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c8_part3.xls
dir : seeout

. 
. 
. * Table C9, Rows I & J
. cap erase "$path3/tab_c9_I_J.xls"

. cap erase "$path3/tab_c9_I_J.txt"

. 
. foreach sample in  "han_hh == 1 & !rural" "han_hh == 1 & rural"{
  2. foreach y_var in  "elig_edu""educ" {
  3. reghdfe `y_var' c.(fine_6_20) if  `sample' [aw = wt], a($CONTROL_MOTHER) cluster(prov)
  4. su `y_var' if  `sample' [aw = wt]
  5. outreg2 using "$path3/tab_c9_I_J.xls", dec(3) append adds(mean, `r(mean)')
  6. 
. }
  7. }
(dropped 4 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =    467,218
Absorbing 3 HDFE groups                           F(   1,     27) =       2.54
Statistics robust to heteroskedasticity           Prob > F        =     0.1227
                                                  R-squared       =     0.4386
                                                  Adj R-squared   =     0.4381
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.2906

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0776912    .048756     1.59   0.123    -.0223479    .1777302
       _cons |   .7904383   .0158538    49.86   0.000     .7579089    .8229677
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       213           0         213    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 467,222      552848     .815698   .3877307          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c9_I_J.xls
dir : seeout
(dropped 4 singleton observations)
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs   =    467,218
Absorbing 3 HDFE groups                           F(   1,     27) =       2.51
Statistics robust to heteroskedasticity           Prob > F        =     0.1245
                                                  R-squared       =     0.7543
                                                  Adj R-squared   =     0.7541
                                                  Within R-sq.    =     0.0003
Number of clusters (prov)    =         28         Root MSE        =     0.3264

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0930282   .0586691     1.59   0.124     -.027351    .2134073
       _cons |    2.37994   .0190773   124.75   0.000     2.340796    2.419083
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       213           0         213    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 467,222      552848    2.410209   .6581785          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c9_I_J.xls
dir : seeout
(dropped 5 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,173,811
Absorbing 3 HDFE groups                           F(   1,     27) =       2.63
Statistics robust to heteroskedasticity           Prob > F        =     0.1162
                                                  R-squared       =     0.5622
                                                  Adj R-squared   =     0.5622
                                                  Within R-sq.    =     0.0001
Number of clusters (prov)    =         28         Root MSE        =     0.3055

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0588568   .0362669     1.62   0.116    -.0155568    .1332704
       _cons |   .6744867   .0106614    63.26   0.000     .6526113    .6963621
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       222           0         222    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2173816     2391835    .6917848   .4617561          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c9_I_J.xls
dir : seeout
(dropped 5 singleton observations)
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs   =  2,173,811
Absorbing 3 HDFE groups                           F(   1,     27) =       2.36
Statistics robust to heteroskedasticity           Prob > F        =     0.1358
                                                  R-squared       =     0.5279
                                                  Adj R-squared   =     0.5278
                                                  Within R-sq.    =     0.0002
Number of clusters (prov)    =         28         Root MSE        =     0.3578

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   .0820293   .0533568     1.54   0.136    -.0274497    .1915084
       _cons |   2.119416   .0156853   135.12   0.000     2.087232    2.151599
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------------+
                Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------------+---------------------------------------|
                  girl#prov |        56          56           0    *|
   girl#prov#c.m_birth_year |        56           0          56     |
     girl#m_birth_year#year |       222           0         222    ?|
              girl#age#year |        80           8          72     |
--------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2173816     2391835    2.143529   .5206517          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c9_I_J.xls
dir : seeout

. 
. 
. 
. * Table C10
. cap erase "$path3/tab_c10.xls"

. cap erase "$path3/tab_c10.txt"

. foreach sample in "han_hh == 1" {
  2. reghdfe max_order c.(fine_0) if  `sample' &  b_order == 1 [aw = wt], a($CONTROL_GIRL) cluste
> r(prov)
  3. su max_order if  `sample' [aw = wt]
  4. outreg2 using "$path3/tab_c10.xls", dec(3) append adds(mean, `r(mean)')
  5. 
. foreach y_var in "elig_edu""educ" {
  6. reghdfe `y_var' c.(fine_0) if  `sample' [aw = wt], a($CONTROL_GIRL) cluster(prov)
  7. su `y_var' if  `sample' [aw = wt]
  8. outreg2 using "$path3/tab_c10.xls", dec(3) append adds(mean, `r(mean)')
  9. }
 10. }
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  2,701,444
Absorbing 2 HDFE groups                           F(   1,     27) =       0.01
Statistics robust to heteroskedasticity           Prob > F        =     0.9044
                                                  R-squared       =     0.4972
                                                  Adj R-squared   =     0.4972
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         28         Root MSE        =     0.6245

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
   max_order |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      fine_0 |  -.0015971   .0131677    -0.12   0.904    -.0286149    .0254208
       _cons |   1.742997   .0161837   107.70   0.000     1.709791    1.776203
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
              Absorbed FE | Categories  - Redundant  = Num. Coefs |
--------------------------+---------------------------------------|
                girl#prov |        56          56           0    *|
   girl#prov#c.birth_year |        56           0          56     |
     girl#birth_year#year |       140           0         140    ?|
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
   max_order | 4803760     5233312    2.185779   1.039802          1         11
/Users/Wei/Dropbox/Fertility/Results/tab_c10.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  2,641,038
Absorbing 2 HDFE groups                           F(   1,     27) =       0.15
Statistics robust to heteroskedasticity           Prob > F        =     0.7043
                                                  R-squared       =     0.4470
                                                  Adj R-squared   =     0.4469
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         28         Root MSE        =     0.3357

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
    elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      fine_0 |  -.0021902   .0057091    -0.38   0.704    -.0139042    .0095239
       _cons |   .7173896   .0061017   117.57   0.000     .7048699    .7299093
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
              Absorbed FE | Categories  - Redundant  = Num. Coefs |
--------------------------+---------------------------------------|
                girl#prov |        56          56           0    *|
   girl#prov#c.birth_year |        56           0          56     |
     girl#birth_year#year |        86           0          86    ?|
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
    elig_edu | 2641038     2944683    .7150488   .4513913          0          1
/Users/Wei/Dropbox/Fertility/Results/tab_c10.xls
dir : seeout
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =  2,641,038
Absorbing 2 HDFE groups                           F(   1,     27) =       0.01
Statistics robust to heteroskedasticity           Prob > F        =     0.9145
                                                  R-squared       =     0.5740
                                                  Adj R-squared   =     0.5740
                                                  Within R-sq.    =     0.0000
Number of clusters (prov)    =         28         Root MSE        =     0.3648

                                  (Std. Err. adjusted for 28 clusters in prov)
------------------------------------------------------------------------------
             |               Robust
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      fine_0 |   .0007043   .0064991     0.11   0.914    -.0126306    .0140393
       _cons |   2.192844   .0069461   315.70   0.000     2.178591    2.207096
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
              Absorbed FE | Categories  - Redundant  = Num. Coefs |
--------------------------+---------------------------------------|
                girl#prov |        56          56           0    *|
   girl#prov#c.birth_year |        56           0          56     |
     girl#birth_year#year |        86           0          86    ?|
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
        educ | 2641038     2944683    2.193596   .5588923          1          4
/Users/Wei/Dropbox/Fertility/Results/tab_c10.xls
dir : seeout

. 
. log close 
      name:  <unnamed>
       log:  /Users/Wei/Dropbox/Fertility/Results/child_results.log
  log type:  text
 closed on:  21 Jan 2020, 12:43:06
-------------------------------------------------------------------------------------------------
